package com.lbd99.data.lbd.dao;


import com.lbd99.data.lbd.vo.TConfig;
import com.lbd99.data.lbd.vo.TUser;
import com.lbd99.data.lbd.vo.Trecharge;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface TUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TUser record);

    int insertSelective(TUser record);

    TUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TUser record);

    int updateByPrimaryKey(TUser record);

    List<TUser> selectList(Map<String, Object> map);

    List<Map<String,Object>> selectListMap(Map<String, Object> map);
    
    List<Map<String,Object>> getParameter();


    //*****************************************

    /**
     * 查询个数
     */
    int  selectCount2(TUser entity);

    /**
     * 查询 列表信息
     */
    List<TUser>  selectList2(TUser entity);
    
    int updateConfig(TConfig tConfig);
    
    int insertConfig(TConfig tConfig);
    
    int checkConfig(String keys);

	void updateConfinedStatus(Map<String, Object> dataMap);

	Integer regCountToday(Map<String, Object> map);

	Integer regCountWeek(Map<String, Object> map);
	
	List<Map<String, Object>> getExchangeList(Map<String, Object> map);
	
	List<Map<String, Object>> getExchangeListWeek(Map<String, Object> map);

    int selectCountByPid(int pid);

	TUser selectByPhone(String tel);  
	
	List<Map<String, Object>> getRechargeRecord(Map<String, Object> map);

	List<Integer> selectTreeIds(Integer id);
	
	int updateUserPhone(@Param("phone") String phone,@Param("id") int id);
	
	int checkUserPhone(String phone);
	
	int updateUserStatus(@Param("state") int state,@Param("id") int id);

	void insertRechargeLog(Trecharge trecharge);

	void confineTradeCountSave(Map<String, Object> map);

	List<Map<String, Object>> getChildUserByParentId(Map<String, Object> datamap);

}